package stars.starSystems;

import java.util.ArrayList;
import java.util.HashMap;

import model.IModel;

import com.jme3.math.Vector3f;
import com.jme3.scene.Spatial;

import utilities.Key;
import view.EViewList;
import view.AbstractView;
import view.IView;
import controller.AbstractController;
import controller.IController;
import controller.PhysicalEventStrategyPack;
import eventManager.AppEvent;
import eventManager.EventManager;
import eventManager.IEventData;
import eventStrategies.ChangeViewStrategy;
import eventStrategies.DefaultViewStrategy;
import eventStrategies.ReplyGetGroupZoneParamsStrategy;
import eventStrategies.view.InitViewEventStrategy;
import events.ECodeEventList;
import events.stateMachine.strategyState.DefaultViewEvent;

public class StarSystemController extends AbstractController {

	//private HashMap<String, VStarSystem> views = new HashMap<String, VStarSystem>();
	
	public StarSystemController(EventManager eventManager, StarSystemModel model, Spatial spatial) {
		super(eventManager);
		this.model = model;
		this.spatial = spatial;
		loadSpecificEventStrategies();		
	}
	
	//this.events.add(CodeEventList.STARSYSTEM_ADD_STAR.toString());
	//this.events.add(ECodeEventList.STRATEGY_STATE_DEFAULT_VIEW.toString());
	//this.events.add(ECodeEventList.FACE_CAMERA.toString());
	public void loadSpecificEventStrategies() {
		loadStrategy(new ReplyGetGroupZoneParamsStrategy());
		loadStrategy(new ChangeViewStrategy(this.spatial));
		//loadStrategy(new ChangeViewStrategy(this.views, this));
		
		
		
		//loadStrategy(new DefaultViewStrategy(this.views));
		//loadStrategy(new InitViewEventStrategy(this.views));
	}
	
	
	
	
	
//	public void update(float tpf) {
//		
//	}
	
	
	
//	//IController methods
//	public void setModel(IModel model) {
//		controller.setModel(model);		
//	}
//
//	public void addView(AbstractView view) {
//		controller.addView(view);
//	}
//
//	public HashMap<EViewList, AbstractView> getViews() {
//		return controller.getViews();
//	}
//
//	
//	
//	public HashMap<ECodeEventList, CodeEventStrategy> getEvents() {
//		return controller.getEvents();
//	}
	
//	public HashMap<ECodeEventList, CodeEventStrategy> getViewEvents() {
//		return controller.getViewEvents();
//	}
//	
//	public HashMap<ECodeEventList, CodeEventStrategy> getControllerEvents() {
//		return controller.getControllerEvents();
//	}

	
	
//	public void loadStrategy(CodeEventStrategy strategy) {
//		controller.loadStrategy(strategy);
//	}
	
//	public void loadViewStrategy(CodeEventStrategy strategy) {
//		controller.loadStrategy(strategy);
//	}
//	
//	public void loadControllerStrategy(CodeEventStrategy strategy) {
//		controller.loadStrategy(strategy);
//	}

	
	
//	public void processOutgoingEvent(IEventData event) {
//		controller.processOutgoingEvent(event);
//	}
//
//	public void handleEvent(IEventData event) {
//		controller.handleEvent(event);
//	}
//
//	public Key getKey() {
//		return controller.getKey();
//	}
//	
//	public void setKey(Key key) {
//		controller.setKey(key);
//	}
	

}
